home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Internet / Web Things / HTML.edit 1.5b1.sit / HTML.edit.1.5b1 / HTML.edit v1.5b1 / HTML.edit v1.5b1.rsrc / TEXT_24418_Character Formatting.txt < prev    next >
Encoding:
Text File  |  1994-11-30  |  3.3 KB  |  79 lines

  1.  
  2. National Center for Supercomputing Applications
  3. A Beginner's Guide to HTML
  4.  
  5. Character Formatting
  6.  
  7. You can code individual words or sentences with special styles. There are two types of styles: logical and physical. Logical styles tag text according to its meaning, while  physical styles specify the specific appearance of a section. For example, in the preceding sentence, the words "logical styles'' was tagged as a "definition.'' The same effect (formatting those words in italics), could have been achieved via a different tag that specifies merely "put these words in italics.''  
  8.  
  9.  
  10. Physical Versus Logical: Use Logical Styles When Possible
  11.  
  12. If physical and logical styles produce the same result on the screen, why are there both? We devolve, for a couple of paragraphs, into the philosophy of SGML, which can be summed in a Zen-like mantra: "Trust your browser.''  
  13.  
  14. In the ideal SGML universe, content is divorced from presentation. Thus, SGML tags a level-one heading as a level-one heading, but does not specify that the level-one heading should be, for instance, 24-point bold Times centered on the top of a page. The advantage of this approach (it's similar in concept to style sheets in many word processors) is that if you decide to change level-one headings to be 20-point left-justified Helvetica, all you have to do is change the definition of the level-one heading in the presentation device (i.e., your World Wide Web browser).  
  15.  
  16. The other advantage of logical tags is that they help enforce consistency in your documents. It's easier to tag something as <H1> than to remember that level-one headings are 24-point bold Times or whatever. The same is true for character styles. For example, consider the <STRONG> tag. Most browsers render it in bold text. However, it is possible that a reader would prefer that these sections be displayed in red instead. Logical styles offer this flexibility.  
  17.  
  18.  
  19. Logical Styles
  20.  
  21. <DFN> 
  22.    for a word being defined. Typically displayed in italics.
  23.    (NCSA Mosaic is a World Wide Web browser.)
  24.  
  25. <EM> 
  26.    for emphasis. Typically displayed in italics.
  27.    (Watch out for pickpockets.)
  28.  
  29. <CITE> 
  30.    for titles of books, films, etc. Typically displayed in italics.
  31.    (A Beginner's Guide to HTML)
  32.  
  33. <CODE> 
  34.    for snippets of computer code. Displayed in a fixed-width font.
  35.   (The <stdio.h> header file)
  36.  
  37. <KBD> 
  38.    for user keyboard entry. Should be displayed in a bold fixed-width font, but
  39.    many browsers render it in the plain fixed-width font.
  40.    (Enter passwd to change your password.)
  41.  
  42. <SAMP> 
  43.    for computer status messages. Displayed in a fixed-width font.
  44.   (Segmentation fault: Core dumped.)
  45.  
  46. <STRONG> 
  47.    for strong emphasis. Typically displayed in bold.
  48.    (Important) 
  49.  
  50. <VAR> 
  51.    for a "metasyntactic'' variable, where the user is to replace the variable with
  52.    a specific instance. Typically displayed in italics.
  53.    (rm filename deletes the file.) 
  54.  
  55.  
  56. Physical Styles
  57.  
  58. <B> 
  59.    bold text
  60.  
  61. <I> 
  62.    italic text
  63.  
  64. <TT> 
  65.    typewriter text, e.g. fixed-width font. 
  66.  
  67.  
  68. Using Character Tags
  69.  
  70. To apply a character style, 
  71.  
  72.  1. Start with <tag>, where tag is the desired character formatting tag, to indicate the beginning of the tagged text. 
  73.  2. Enter the tagged text. 
  74.  3. End the passage with </tag>. 
  75.  
  76. back to Additional Markup Tags
  77. on to Special Characters
  78. return to Beginner's Guide  Contents.
  79.